package com.umgsai.aop.level1;

/**
 * Created by shangyidong on 17/6/29.
 */
public class ArithmeticCalculatorImpl implements ArithmeticCalculator {

    public int add(int i, int j) {
        System.out.println("The method add begins with [" + i + ", " + j + "]");
        int result = i + j;
        System.out.println("The method add end with " + result);
        return result;
    }

    public int sub(int i, int j) {
        System.out.println("The method sub begins with [" + i + ", " + j + "]");
        int result = i - j;
        System.out.println("The method sub end with " + result);
        return result;
    }

    public int mul(int i, int j) {
        System.out.println("The method mul begins with [" + i + ", " + j + "]");
        int result = i * j;
        System.out.println("The method  mul end with " + result);
        return result;
    }

    public int div(int i, int j) {
        System.out.println("The method div begins with [" + i + ", " + j + "]");
        int result = i / j;
        System.out.println("The method div end with " + result);
        return result;
    }
}
